import request from '@/utils/request'
/**
 * 获取所有权限点
 * @returns
 */
export const getPermissionList = () => {
  return request({
    method: 'GET',
    url: '/sys/permission'
  })
}
/**
 * 删除权限
 * @param {*} id 权限点id
 * @returns
 */
export const delPermission = (id) => {
  return request({
    method: 'delete',
    url: '/sys/permission/' + id
  })
}
/**
 * 添加权限点
 * @param {*} data
 * @returns
 */
export const addPermission = (data) => {
  return request({
    method: 'post',
    url: '/sys/permission',
    data
  })
}
/**
 * 修改权限点
 * @param {*} data
 * @returns
 */
export const editPermission = (data) => {
  return request({
    method: 'put',
    url: '/sys/permission/' + data.id,
    data
  })
}
